import service from "@/request";

interface AdbDeviceDataI {
    udid: string
    name: string
    imei: string
    status: string
}

export async function apiGetAdbDevices() {
    try {
        return service.request({
            url: 'api/adb/devices',
            method: 'GET',
        })
    } catch (err) {
        throw err
    }
}

export async function apiConnectAdbDevice(ip: string) {
    try {

        return service.request({
            // url: 'api/devices/adb/device/connect/',
            url: 'api/adb/device/connect',
            method: 'POST',
            params: {
                ip: ip
            }
        }).then(
            res => console.log("res: ", res)
        )
    } catch (err) {
        throw err
    }
}